<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>set</title>
</head>
<body>
  <script>
    // const set = new Set([1,2,3,4,4]);
    // console.log(...set);
    // console.log(set.size);  

    let s = new Set();
    s.add(1).add(2).add(2);
    console.log(s);
    console.log(s.size);
    console.log(s.has(1));
    console.log(s.has(3));
    console.log(s.delete(2));
    console.log(s.has(2));
    // console.log(s.clear());
  </script>
</body>
</html>